First of all, the base objects of the system are Faces
(triangles, no more than 3 vertex), Edges
(lines, connecting vertex to vertex, defined because edges are shared by
more faces, so less calc) and Points (dots
in the space).
A basilar concept is the Ref : that's
a 3D orthogonal coords system; is defined by 4 vectors, an O (origin of
system), and I,J,K (the versors (=vectors of lenght 1), orthogonal).
A Ref in reality has 3 coords systems in itself: the
Rel, wich is referred to the parent system: means it's not absolute
in the space, but relative to another one; the Abs
wich contains the absolute coords, not referred to a parent.
Think a man that is walking on a ship: the man's Rel ref is moving
with man's speed, related to the ship, and it's Abs is moving at the speed
of the ship plus the speed of the man.
The
Man on a Ship example: Rel moving but Abs no.
The third one is internally used, and is the Cam:
are the coords calced referring to the Camera system, wich is the Abs Ref
from where you see the world.
A complete ref plus Parent's definition and some more (flags,...) in
Wild is an Entity: is an object with a Ref,
a Parent Ref (wich is zero if this is an Absolute entity, not moving relating
to anything else).
The basic 3D object in Wild it the Sector.
That's an Entity made of a Shell (wich is
a list of faces), a Wire (wich is a list of
edges) and a Nebula (wich is a list of Points).
Some Sectors make an Alien, wich is a
complex Entity made of some sub-objects (the Sectors). The Sectors are
linked to that by a list. An alien example: a monster made of a body, 2
heads and 3 arms, and every arm is made of a top part, a bottom part and
a hand (we may also have the fingers, but I think it's enough); that Alien
is made of 12 Sectors: the body, the head1, the head2, the toparm1, the
toparm2, the toparm 3 (all those's Parent Ref if directly the Alien), the
botomarm1 (it's parent is the toparm1), the bottomarm2, the bottomarm3,
the hand1 (child of bottomarm1), the hand2, the hand3.
Haha
! The alien ! Every color is a different sector !!
A special Alien is the Arena, wich is
the "room" (or the "arena") where Aliens move into. It has its Sectors
like any other Alien (for example, the ground and the walls), and has 2
lists more than Aliens: the Aliens (wich are included in this Arena, so
are displayed when this is displayed) and the Lights. In a world you can
have more Arenas, but only one should be visualized : the one you're playing
into. That's usefull to reduce polys in the scene.
A Light is a struct defining a dynamical
light (there are not statical lights, now (it's an optimize to do in the
future, by a flag)), so its color and its Spot, so a Point from any Nebula
of any Sector. It's really easy to have a light in the eye of a bad monster,
moving with it adn changing color when you make it angry.
A World is made of a list of Arenas, and
a list of Textures (but probably will grow).
A Scene is made by a Camera, a World and
some more data used to display the World (so Palette,...)
The Camera is the Abs Ref which defines
the point of view of your display. The I,J,K versors become the x, the
y on screen, and the z (= the depth).
Scene is the root struct about 3DWorld, it is directly pointed by WildApp.